import * as ajax from "../../common/ajax";

export const get = id => ajax.get("/admin/class/" + id);

export const addClass = entity =>
  ajax.post("/admin/class/addClassInfo", entity);

// eslint-disable-next-line prettier/prettier
export const removeClass = id => ajax.pureDelete("/admin/class/removeClassInfo/" + id);

export const update = entity => ajax.put("/admin/class", entity);

export const getPageCount = () => ajax.get("/admin/class/page/count");

export const getPage = index => ajax.get("/admin/class/page/" + index);
export const getPageByKeywordIndex = (keyword, index) =>
  ajax.get("/admin/class/page/keyword/index/" + keyword + index);
export const getPageInfo = index =>
  ajax.get("/admin/class/page/listName/index/" + index);

export const listName = () => ajax.pureGet("/admin/class/names");

export const pageSize = 10;
